using System;
using System.Collections.Generic;
using System.Data;
using nDeveloper.BO.Base.Domain;

namespace nDeveloper.UI.Windows.IDE
{
    public class Schema : BaseDb
    {
        public DataTable GetTables()
        {
            return con.GetSchemaTables(DataBaseConfig.GetDataBaseName());
        }

        public DataTable GetTable(string TableName)
        {
            return con.GetSchemaTable(TableName, DataBaseConfig.GetDataBaseName());
        }

        public DataTable GetColumns(string TableName)
        {
            return con.GetSchemaColumnsTable(TableName, nDeveloper.Data.ConnectionState.CloseOnExit);
        }

        public DataTable GetColumn(string TableName, string ColumnName)
        {
            return con.GetSchemaColumnTable(TableName, ColumnName, nDeveloper.Data.ConnectionState.CloseOnExit);
        }

        public Dictionary<int, string> GetDataTypes()
        {
            return con.GetDataTypes();
        }
    }
}